﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.FieldAccess;

namespace com.gexin.rp.sdk.dto
{
	// Token: 0x02000010 RID: 16
	[DebuggerNonUserCode]
	public sealed class SingleBatchRequest : GeneratedMessage<SingleBatchRequest, SingleBatchRequest.Builder>
	{
		// Token: 0x0600015A RID: 346 RVA: 0x00004442 File Offset: 0x00002642
		private SingleBatchRequest()
		{
		}

		// Token: 0x17000092 RID: 146
		// (get) Token: 0x0600015B RID: 347 RVA: 0x00004467 File Offset: 0x00002667
		public static SingleBatchRequest DefaultInstance
		{
			get
			{
				return SingleBatchRequest.defaultInstance;
			}
		}

		// Token: 0x17000093 RID: 147
		// (get) Token: 0x0600015C RID: 348 RVA: 0x0000446E File Offset: 0x0000266E
		public override SingleBatchRequest DefaultInstanceForType
		{
			get
			{
				return SingleBatchRequest.DefaultInstance;
			}
		}

		// Token: 0x17000094 RID: 148
		// (get) Token: 0x0600015D RID: 349 RVA: 0x00002579 File Offset: 0x00000779
		protected override SingleBatchRequest ThisMessage
		{
			get
			{
				return this;
			}
		}

		// Token: 0x17000095 RID: 149
		// (get) Token: 0x0600015E RID: 350 RVA: 0x00004475 File Offset: 0x00002675
		public static MessageDescriptor Descriptor
		{
			get
			{
				return GtReq.internal__static_com_gexin_rp_sdk_dto_SingleBatchRequest__Descriptor;
			}
		}

		// Token: 0x17000096 RID: 150
		// (get) Token: 0x0600015F RID: 351 RVA: 0x0000447C File Offset: 0x0000267C
		protected override FieldAccessorTable<SingleBatchRequest, SingleBatchRequest.Builder> InternalFieldAccessors
		{
			get
			{
				return GtReq.internal__static_com_gexin_rp_sdk_dto_SingleBatchRequest__FieldAccessorTable;
			}
		}

		// Token: 0x17000097 RID: 151
		// (get) Token: 0x06000160 RID: 352 RVA: 0x00004483 File Offset: 0x00002683
		public bool HasBatchId
		{
			get
			{
				return this.hasBatchId;
			}
		}

		// Token: 0x17000098 RID: 152
		// (get) Token: 0x06000161 RID: 353 RVA: 0x0000448B File Offset: 0x0000268B
		public string BatchId
		{
			get
			{
				return this.batchId_;
			}
		}

		// Token: 0x17000099 RID: 153
		// (get) Token: 0x06000162 RID: 354 RVA: 0x00004493 File Offset: 0x00002693
		public IList<SingleBatchItem> BatchItemList
		{
			get
			{
				return this.batchItem_;
			}
		}

		// Token: 0x1700009A RID: 154
		// (get) Token: 0x06000163 RID: 355 RVA: 0x0000449B File Offset: 0x0000269B
		public int BatchItemCount
		{
			get
			{
				return this.batchItem_.Count;
			}
		}

		// Token: 0x06000164 RID: 356 RVA: 0x000044A8 File Offset: 0x000026A8
		public SingleBatchItem GetBatchItem(int index)
		{
			return this.batchItem_[index];
		}

		// Token: 0x1700009B RID: 155
		// (get) Token: 0x06000165 RID: 357 RVA: 0x000044B8 File Offset: 0x000026B8
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBatchId)
				{
					return false;
				}
				using (IEnumerator<SingleBatchItem> enumerator = this.BatchItemList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						if (!enumerator.Current.IsInitialized)
						{
							return false;
						}
					}
				}
				return true;
			}
		}

		// Token: 0x06000166 RID: 358 RVA: 0x00004518 File Offset: 0x00002718
		public override void WriteTo(ICodedOutputStream output)
		{
			this.CalcSerializedSize();
			string[] singleBatchRequestFieldNames = SingleBatchRequest._singleBatchRequestFieldNames;
			if (this.hasBatchId)
			{
				output.WriteString(1, singleBatchRequestFieldNames[0], this.BatchId);
			}
			if (this.batchItem_.Count > 0)
			{
				output.WriteMessageArray<SingleBatchItem>(2, singleBatchRequestFieldNames[1], this.batchItem_);
			}
			this.UnknownFields.WriteTo(output);
		}

		// Token: 0x1700009C RID: 156
		// (get) Token: 0x06000167 RID: 359 RVA: 0x00004574 File Offset: 0x00002774
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				return this.CalcSerializedSize();
			}
		}

		// Token: 0x06000168 RID: 360 RVA: 0x00004594 File Offset: 0x00002794
		private int CalcSerializedSize()
		{
			int num = this.memoizedSerializedSize;
			if (num != -1)
			{
				return num;
			}
			num = 0;
			if (this.hasBatchId)
			{
				num += CodedOutputStream.ComputeStringSize(1, this.BatchId);
			}
			foreach (SingleBatchItem value in this.BatchItemList)
			{
				num += CodedOutputStream.ComputeMessageSize(2, value);
			}
			num += this.UnknownFields.SerializedSize;
			this.memoizedSerializedSize = num;
			return num;
		}

		// Token: 0x06000169 RID: 361 RVA: 0x00004620 File Offset: 0x00002820
		public static SingleBatchRequest ParseFrom(ByteString data)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}

		// Token: 0x0600016A RID: 362 RVA: 0x00004632 File Offset: 0x00002832
		public static SingleBatchRequest ParseFrom(ByteString data, ExtensionRegistry extensionRegistry)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(data, extensionRegistry).BuildParsed();
		}

		// Token: 0x0600016B RID: 363 RVA: 0x00004645 File Offset: 0x00002845
		public static SingleBatchRequest ParseFrom(byte[] data)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}

		// Token: 0x0600016C RID: 364 RVA: 0x00004657 File Offset: 0x00002857
		public static SingleBatchRequest ParseFrom(byte[] data, ExtensionRegistry extensionRegistry)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(data, extensionRegistry).BuildParsed();
		}

		// Token: 0x0600016D RID: 365 RVA: 0x0000466A File Offset: 0x0000286A
		public static SingleBatchRequest ParseFrom(Stream input)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(input).BuildParsed();
		}

		// Token: 0x0600016E RID: 366 RVA: 0x0000467C File Offset: 0x0000287C
		public static SingleBatchRequest ParseFrom(Stream input, ExtensionRegistry extensionRegistry)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(input, extensionRegistry).BuildParsed();
		}

		// Token: 0x0600016F RID: 367 RVA: 0x0000468F File Offset: 0x0000288F
		public static SingleBatchRequest ParseDelimitedFrom(Stream input)
		{
			return SingleBatchRequest.CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
		}

		// Token: 0x06000170 RID: 368 RVA: 0x000046A1 File Offset: 0x000028A1
		public static SingleBatchRequest ParseDelimitedFrom(Stream input, ExtensionRegistry extensionRegistry)
		{
			return SingleBatchRequest.CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
		}

		// Token: 0x06000171 RID: 369 RVA: 0x000046B4 File Offset: 0x000028B4
		public static SingleBatchRequest ParseFrom(ICodedInputStream input)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(input).BuildParsed();
		}

		// Token: 0x06000172 RID: 370 RVA: 0x000046C6 File Offset: 0x000028C6
		public static SingleBatchRequest ParseFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
		{
			return SingleBatchRequest.CreateBuilder().MergeFrom(input, extensionRegistry).BuildParsed();
		}

		// Token: 0x06000173 RID: 371 RVA: 0x000046D9 File Offset: 0x000028D9
		private SingleBatchRequest MakeReadOnly()
		{
			this.batchItem_.MakeReadOnly();
			return this;
		}

		// Token: 0x06000174 RID: 372 RVA: 0x000046E7 File Offset: 0x000028E7
		public static SingleBatchRequest.Builder CreateBuilder()
		{
			return new SingleBatchRequest.Builder();
		}

		// Token: 0x06000175 RID: 373 RVA: 0x000046EE File Offset: 0x000028EE
		public override SingleBatchRequest.Builder ToBuilder()
		{
			return SingleBatchRequest.CreateBuilder(this);
		}

		// Token: 0x06000176 RID: 374 RVA: 0x000046E7 File Offset: 0x000028E7
		public override SingleBatchRequest.Builder CreateBuilderForType()
		{
			return new SingleBatchRequest.Builder();
		}

		// Token: 0x06000177 RID: 375 RVA: 0x000046F6 File Offset: 0x000028F6
		public static SingleBatchRequest.Builder CreateBuilder(SingleBatchRequest prototype)
		{
			return new SingleBatchRequest.Builder(prototype);
		}

		// Token: 0x06000178 RID: 376 RVA: 0x00004700 File Offset: 0x00002900
		static SingleBatchRequest()
		{
			FileDescriptor descriptor = GtReq.Descriptor;
		}

		// Token: 0x040000E4 RID: 228
		private static readonly SingleBatchRequest defaultInstance = new SingleBatchRequest().MakeReadOnly();

		// Token: 0x040000E5 RID: 229
		private static readonly string[] _singleBatchRequestFieldNames = new string[]
		{
			"batchId",
			"batchItem"
		};

		// Token: 0x040000E6 RID: 230
		private static readonly uint[] _singleBatchRequestFieldTags = new uint[]
		{
			10u,
			18u
		};

		// Token: 0x040000E7 RID: 231
		public const int BatchIdFieldNumber = 1;

		// Token: 0x040000E8 RID: 232
		private bool hasBatchId;

		// Token: 0x040000E9 RID: 233
		private string batchId_ = "";

		// Token: 0x040000EA RID: 234
		public const int BatchItemFieldNumber = 2;

		// Token: 0x040000EB RID: 235
		private PopsicleList<SingleBatchItem> batchItem_ = new PopsicleList<SingleBatchItem>();

		// Token: 0x040000EC RID: 236
		private int memoizedSerializedSize = -1;

		// Token: 0x0200005C RID: 92
		[DebuggerNonUserCode]
		public sealed class Builder : GeneratedBuilder<SingleBatchRequest, SingleBatchRequest.Builder>
		{
			// Token: 0x170002E3 RID: 739
			// (get) Token: 0x0600070B RID: 1803 RVA: 0x00002579 File Offset: 0x00000779
			protected override SingleBatchRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}

			// Token: 0x0600070C RID: 1804 RVA: 0x00010D47 File Offset: 0x0000EF47
			public Builder()
			{
				this.result = SingleBatchRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}

			// Token: 0x0600070D RID: 1805 RVA: 0x00010D61 File Offset: 0x0000EF61
			internal Builder(SingleBatchRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}

			// Token: 0x0600070E RID: 1806 RVA: 0x00010D78 File Offset: 0x0000EF78
			private SingleBatchRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SingleBatchRequest other = this.result;
					this.result = new SingleBatchRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}

			// Token: 0x170002E4 RID: 740
			// (get) Token: 0x0600070F RID: 1807 RVA: 0x00010DB4 File Offset: 0x0000EFB4
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}

			// Token: 0x170002E5 RID: 741
			// (get) Token: 0x06000710 RID: 1808 RVA: 0x00010DC1 File Offset: 0x0000EFC1
			protected override SingleBatchRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}

			// Token: 0x06000711 RID: 1809 RVA: 0x00010DC9 File Offset: 0x0000EFC9
			public override SingleBatchRequest.Builder Clear()
			{
				this.result = SingleBatchRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}

			// Token: 0x06000712 RID: 1810 RVA: 0x00010DDE File Offset: 0x0000EFDE
			public override SingleBatchRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SingleBatchRequest.Builder(this.result);
				}
				return new SingleBatchRequest.Builder().MergeFrom(this.result);
			}

			// Token: 0x170002E6 RID: 742
			// (get) Token: 0x06000713 RID: 1811 RVA: 0x00010E04 File Offset: 0x0000F004
			public override MessageDescriptor DescriptorForType
			{
				get
				{
					return SingleBatchRequest.Descriptor;
				}
			}

			// Token: 0x170002E7 RID: 743
			// (get) Token: 0x06000714 RID: 1812 RVA: 0x0000446E File Offset: 0x0000266E
			public override SingleBatchRequest DefaultInstanceForType
			{
				get
				{
					return SingleBatchRequest.DefaultInstance;
				}
			}

			// Token: 0x06000715 RID: 1813 RVA: 0x00010E0B File Offset: 0x0000F00B
			public override SingleBatchRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}

			// Token: 0x06000716 RID: 1814 RVA: 0x00010E2E File Offset: 0x0000F02E
			public override SingleBatchRequest.Builder MergeFrom(IMessage other)
			{
				if (other is SingleBatchRequest)
				{
					return this.MergeFrom((SingleBatchRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}

			// Token: 0x06000717 RID: 1815 RVA: 0x00010E50 File Offset: 0x0000F050
			public override SingleBatchRequest.Builder MergeFrom(SingleBatchRequest other)
			{
				if (other == SingleBatchRequest.DefaultInstance)
				{
					return this;
				}
				this.PrepareBuilder();
				if (other.HasBatchId)
				{
					this.BatchId = other.BatchId;
				}
				if (other.batchItem_.Count != 0)
				{
					this.result.batchItem_.Add(other.batchItem_);
				}
				this.MergeUnknownFields(other.UnknownFields);
				return this;
			}

			// Token: 0x06000718 RID: 1816 RVA: 0x00010EB3 File Offset: 0x0000F0B3
			public override SingleBatchRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}

			// Token: 0x06000719 RID: 1817 RVA: 0x00010EC4 File Offset: 0x0000F0C4
			public override SingleBatchRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				UnknownFieldSet.Builder builder = null;
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SingleBatchRequest._singleBatchRequestFieldNames, text, StringComparer.Ordinal);
						if (num2 < 0)
						{
							if (builder == null)
							{
								builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
							}
							this.ParseUnknownField(input, builder, extensionRegistry, num, text);
							continue;
						}
						num = SingleBatchRequest._singleBatchRequestFieldTags[num2];
					}
					if (num == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num != 10u)
					{
						if (num != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								if (builder != null)
								{
									this.UnknownFields = builder.Build();
								}
								return this;
							}
							if (builder == null)
							{
								builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
							}
							this.ParseUnknownField(input, builder, extensionRegistry, num, text);
						}
						else
						{
							input.ReadMessageArray<SingleBatchItem>(num, text, this.result.batchItem_, SingleBatchItem.DefaultInstance, extensionRegistry);
						}
					}
					else
					{
						this.result.hasBatchId = input.ReadString(ref this.result.batchId_);
					}
				}
				if (builder != null)
				{
					this.UnknownFields = builder.Build();
				}
				return this;
			}

			// Token: 0x170002E8 RID: 744
			// (get) Token: 0x0600071A RID: 1818 RVA: 0x00010FC5 File Offset: 0x0000F1C5
			public bool HasBatchId
			{
				get
				{
					return this.result.hasBatchId;
				}
			}

			// Token: 0x170002E9 RID: 745
			// (get) Token: 0x0600071B RID: 1819 RVA: 0x00010FD2 File Offset: 0x0000F1D2
			// (set) Token: 0x0600071C RID: 1820 RVA: 0x00010FDF File Offset: 0x0000F1DF
			public string BatchId
			{
				get
				{
					return this.result.BatchId;
				}
				set
				{
					this.SetBatchId(value);
				}
			}

			// Token: 0x0600071D RID: 1821 RVA: 0x00010FE9 File Offset: 0x0000F1E9
			public SingleBatchRequest.Builder SetBatchId(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBatchId = true;
				this.result.batchId_ = value;
				return this;
			}

			// Token: 0x0600071E RID: 1822 RVA: 0x00011016 File Offset: 0x0000F216
			public SingleBatchRequest.Builder ClearBatchId()
			{
				this.PrepareBuilder();
				this.result.hasBatchId = false;
				this.result.batchId_ = "";
				return this;
			}

			// Token: 0x170002EA RID: 746
			// (get) Token: 0x0600071F RID: 1823 RVA: 0x0001103C File Offset: 0x0000F23C
			public IPopsicleList<SingleBatchItem> BatchItemList
			{
				get
				{
					return this.PrepareBuilder().batchItem_;
				}
			}

			// Token: 0x170002EB RID: 747
			// (get) Token: 0x06000720 RID: 1824 RVA: 0x00011049 File Offset: 0x0000F249
			public int BatchItemCount
			{
				get
				{
					return this.result.BatchItemCount;
				}
			}

			// Token: 0x06000721 RID: 1825 RVA: 0x00011056 File Offset: 0x0000F256
			public SingleBatchItem GetBatchItem(int index)
			{
				return this.result.GetBatchItem(index);
			}

			// Token: 0x06000722 RID: 1826 RVA: 0x00011064 File Offset: 0x0000F264
			public SingleBatchRequest.Builder SetBatchItem(int index, SingleBatchItem value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.batchItem_[index] = value;
				return this;
			}

			// Token: 0x06000723 RID: 1827 RVA: 0x0001108B File Offset: 0x0000F28B
			public SingleBatchRequest.Builder SetBatchItem(int index, SingleBatchItem.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.batchItem_[index] = builderForValue.Build();
				return this;
			}

			// Token: 0x06000724 RID: 1828 RVA: 0x000110B7 File Offset: 0x0000F2B7
			public SingleBatchRequest.Builder AddBatchItem(SingleBatchItem value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.batchItem_.Add(value);
				return this;
			}

			// Token: 0x06000725 RID: 1829 RVA: 0x000110DD File Offset: 0x0000F2DD
			public SingleBatchRequest.Builder AddBatchItem(SingleBatchItem.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.batchItem_.Add(builderForValue.Build());
				return this;
			}

			// Token: 0x06000726 RID: 1830 RVA: 0x00011108 File Offset: 0x0000F308
			public SingleBatchRequest.Builder AddRangeBatchItem(IEnumerable<SingleBatchItem> values)
			{
				this.PrepareBuilder();
				this.result.batchItem_.Add(values);
				return this;
			}

			// Token: 0x06000727 RID: 1831 RVA: 0x00011123 File Offset: 0x0000F323
			public SingleBatchRequest.Builder ClearBatchItem()
			{
				this.PrepareBuilder();
				this.result.batchItem_.Clear();
				return this;
			}

			// Token: 0x0400034F RID: 847
			private bool resultIsReadOnly;

			// Token: 0x04000350 RID: 848
			private SingleBatchRequest result;
		}
	}
}
